<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

/**
 * 比赛表
 *
 * @package App\Models
 *
 */
class Game extends Model
{
    protected $guarded = [];

	const STATUS_READY = 0;
    const STATUS_PROCESSING = 1;
    const STATUS_END = 2;

    public function users(){
    	return $this->hasMany(GameUser::class);
    }

    public function winner(){
    	return $this->belongsTo(User::class,'winner_id');
    }
}
